﻿using System;
using TransferClientLib.UpLoad;
using TransferCommon;
namespace TransferClientLib.UpLoad.Command
{
    public class CheckExist : UpLoadCommandBase
    {
        public override void ExecuteCommand(UpLoadEngine session, TransferCommandInfo commandInfo)
        {
            if (commandInfo.Text == "1")
            {
                if (session.OnFileExist())
                {
                    session.DoUpLoad();
                }
            }
            else
            {
                session.DoUpLoad();
            }
        }

        public override string Name
        {
            get
            {
                return UpLoadOP.CheckExist.ToString();
            }
        }
    }
}
